Feature: Export Decompiled Code to Disk#616
Feature: Export Decompiled Code to Disk#616k-o-n-t-o-r wants to merge 3 commits intoicsharpcode:masterfrom
Conversation
| return s.endsWith("\n") ? s : `${s}\n`; | ||
| } | ||
|
|
||
| function sanitizePathSegment(segment: string) { |
There was a problem hiding this comment.
Please have a look at WholeProjectDecompiler.SanitizeFileName, because I think you are missing some special cases, especially, your code is not checking the length of the individual segments.
| ); | ||
|
|
||
| try { | ||
| await vscode.window.withProgress( |
There was a problem hiding this comment.
Why not reuse WholeProjectDecompiler instead of reinventing it in JavaScript?
|
Moved most of the logic into the backend and am now using |
|
What's the reason for disabling the generation of a project file? It seems odd to me to create a bunch of C# source code files without a project file. |
…fix progress notification
|
Sorry, forgot to remove this. Better now? |
|
Yes, thanks a lot! @Rpinski it's your turn now 😉 |
Rpinski
left a comment
There was a problem hiding this comment.
@k-o-n-t-o-r Sorry that it took me so long to sit down and review your PR! I have only 2 additional comments on this.
|
|
||
| A description of the extension's features can be found in [Feature Tour](https://github.com/icsharpcode/ilspy-vscode/wiki/Feature-Tour). | ||
|
|
||
| ## Export decompiled code |
There was a problem hiding this comment.
I think this section is not needed in README, since we link to the Feature Tour here, where we describe the features for users.
| @@ -0,0 +1,153 @@ | |||
| /*--------------------------------------------------------------------------------------------- | |||
| * Copyright (c) Microsoft Corporation. All rights reserved. | |||
There was a problem hiding this comment.
Shouldn't use a Microsoft copyright here. It's still found in some older files, because the extension was originally started by a Microsoft employee. New files should have an ICSharpCode copyright.
Feature: Export Decompiled Code to Disk
This PR adds a new command,
ILSpy: Export Decompiled Code..., which exports all decompiled types from a selected (loaded) assembly to a user-specified folder while preserving namespace-based directory structure.The export runs with progress + cancellation support, writes
AssemblyInfo.cs/AssemblyInfo.ilat the root, and reports any decompilation errors at the end.The command is available from the assembly node context menu in the
ILSpy: Assemblies viewand via the command palette when assemblies are loaded.